<template>
	<view class="show-line-item" @click="clickHandler">
		<image class="background" :src="img" mode="aspectFill"></image>
		<!-- <image class="btn_pre" src="../../static/guided_icon_back_page@2x.png"></image> -->
		<!-- <image class="btn-start" :src="start?playIconList[1]:playIconList[0]"></image> -->
		<!-- <image class="btn_next" src="../../static/guided_icon_advancing_page@2x.png"></image> -->
		<!-- <view class="line" :style="cssProps"></view> -->
		<secTitle class="secTitle" 
		:title="title" 
		color="#B9AC90" 
		:showMore="showMore" 
		type="show" 
		:moreText="moreText">
		</secTitle>
	</view>
</template>

<script>
	import secTitle from './secTitle.vue'
	export default {
		components: {
			secTitle
		},
		props: {
			id: String,
			title: String,
			img: String,
			showMore:Boolean,
			moreText:String,
		},
		data() {
			return {
				start: false,
				playIconList: [
					'../../static/guided_icon_Play@2x.png',
					'../../static/guided_icon_closure@2x.png'
				],
				percent: '50%'
			}
		},
		methods: {
			clickHandler() {
				this.$emit("clickHandler", this.id)
			},
			// clickMore() {
			// 	this.$emit("clickMore", this.id)
			// }
		},
		computed: {
			cssProps() {
				let params = {
					'--width': this.percent
				}
				return params
			},
		},
	}
</script>

<style>
	.show-line-item {
		margin: 20rpx 20rpx 0rpx 20rpx;
		width: calc(100% - 40rpx);
		display: flex;
		flex-direction: column;
		background: #fff;
		position: relative;
	}

	.background {
		/* width: calc(100% - 40rpx); */
		width: 100%;
		height: 400rpx;
	}
	
	 /* .background {
		width: 100%;
		height: auto;
		margin-bottom: 10rpx;
	} */
	
	 .btn_pre {
		position: absolute;
		bottom: 130rpx;
		left: calc(50% - 160rpx);
		height: 60rpx;
		width: 60rpx;
		border-radius: 30rpx;
		z-index: 9;
	}
	
	 .btn-start {
		position: absolute;
		bottom: 130rpx;
		left: calc(50% - 30rpx);
		height: 60rpx;
		z-index: 9;
		width: 60rpx;
		border-radius: 30rpx;
	}
	
	 .btn_next {
		position: absolute;
		bottom: 130rpx;
		right: calc(50% - 160rpx);
		height: 60rpx;
		z-index: 9;
		width: 60rpx;
		border-radius: 30rpx;
	}
	
	 .line {
		width: var(--width);
		position: absolute;
		bottom: 80rpx;
		left: 0;
		height: 10rpx;
		background: #B9AC90;
		z-index: 9;
	}

	.secTitle {
		width: calc(100% - 40rpx);
	}
</style>
